var Capacity = Vue.component('capacity', {
    data() {
        return {
            editStatus: true // 是否可编辑
        }
    },

    template: `<div class="capacity__box">
                    <div class="capacity__con">
                        <h3 class="index__title capacity__title">产量产能</h3>
                        <div class="index__info capacity__info">
                            <div class="index__table__list capacity__table__list">
                                <table>
                                    <tbody>
                                        <tr>
                                            <th>核心部门</th>
                                            <th>人数</th>
                                        </tr>
                                        <tr>
                                            <td>
                                                <input placeholder="点击编辑设置" :disabled="editStatus" value="999">
                                            </td>
                                            <td>
                                                <input placeholder="点击编辑设置" :disabled="editStatus" value="999">
                                                <b v-show="!editStatus">—</b>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <div class="index__table__add" v-show="!editStatus">
                                    <span>+</span>
                                </div>
                            </div>
                            <div class="capacity__day__num">
                                <div class="capacity__num__con">
                                    <span>日产量：</span>
                                    <input placeholder="点击编辑设置" :disabled="editStatus" value="999">
                                    <i>——</i>
                                    <input placeholder="点击编辑设置" :disabled="editStatus" value="999">
                                </div>
                            </div>
                            <div class="index__table__list capacity__table__list">
                                <table>
                                    <tbody>
                                        <tr>
                                            <th>产品类型</th>
                                            <th>检验类型（几道）</th>
                                        </tr>
                                        <tr>
                                            <td>
                                                <input placeholder="点击编辑设置" :disabled="editStatus" value="999">
                                            </td>
                                            <td>
                                                <input placeholder="点击编辑设置" :disabled="editStatus" value="一道">
                                                <b v-show="!editStatus">—</b>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <input placeholder="点击编辑设置" :disabled="editStatus" value="999">
                                            </td>
                                            <td>
                                                <input placeholder="点击编辑设置" :disabled="editStatus" value="二道">
                                                <b v-show="!editStatus">—</b>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <input placeholder="点击编辑设置" :disabled="editStatus" value="999">
                                            </td>
                                            <td>
                                                <input placeholder="点击编辑设置" :disabled="editStatus" value="二道">
                                                <b v-show="!editStatus">—</b>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <input placeholder="点击编辑设置" :disabled="editStatus" value="二道">
                                            </td>
                                            <td>
                                                <input placeholder="点击编辑设置" :disabled="editStatus" value="二道">
                                                <b v-show="!editStatus">—</b>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            <div class="index__table__list capacity__table__list">
                                <table>
                                    <tbody>
                                        <tr>
                                            <th>部门</th>
                                            <th>人数</th>
                                        </tr>
                                        <tr>
                                            <td>
                                                <input placeholder="点击编辑设置" :disabled="editStatus" value="二道">
                                            </td>
                                            <td>
                                                <input placeholder="点击编辑设置" :disabled="editStatus" value="999">
                                                <b v-show="!editStatus">—</b>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <div class="index__table__add" v-show="!editStatus">
                                    <span>+</span>
                                </div>
                            </div>
                            <div class="capacity__tip">
                                <h6>质量标准（本标准供质检、总检、车间生产使用）</h6>
                                <p>《工艺单》、样品</p>
                                <p>摊平用尺量用目视用手摸</p>
                                <p>质检：每件产品全检</p>
                                <p>总检：抽查品质、尺寸</p>
                                <p>巡检：对在线生产产品存查</p>
                            </div>
                        </div>
                    </div>
                    <div class="common__btn">
                        <div class="common__btn__box">
                            <span class="common__btn__sure" v-show="editStatus" @click="setEditFun">编辑</span>
                            <span class="common__btn__close" v-show="!editStatus" @click="setCancelFun">取消</span>
                            <span class="common__btn__sure" v-show="!editStatus" @click="setInfoFun">保存设置</span>
                        </div>
                    </div>
                </div>`,

    methods: {
        setEditFun: function () {  // 编辑
            this.editStatus = !this.editStatus
        },
        setCancelFun: function () { // 取消
            this.editStatus = !this.editStatus
        },
        setInfoFun: function () { // 保存设置
            this.editStatus = !this.editStatus
        }
    },
    mounted() {
        
    },

    created() {},
})